package com.ruoyi.web.controller.common;

import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;

public class test {
    public static void main(String[] args) {
        List<String> integerList=new LinkedList<String>();
        integerList.add("1");
        integerList.add("2");
        integerList.add("3");
        Iterator<String> iterable=integerList.iterator();
        while (iterable.hasNext()){
            String it =iterable.next();
            if (it=="2") {
                iterable.remove();
            }
        }
        System.out.println(integerList);
    }
}
